package com.jsm.twentyfour.transfer;

import com.jsm.twentyfour.domain.Account;
import com.jsm.twentyfour.domain.Score;
import com.jsm.twentyfour.dto.AccountDTO;
import com.jsm.twentyfour.dto.ScoreDTO;
import com.kejin.util.autoCoding.CU;

/**
 * create by jsm on 2019/1/23
 */
public class ScoreTransfer {
    public static void main(String[] args) {
        CU.d(Score.class, ScoreDTO.class);
        CU.d(ScoreDTO.class, Score.class);
    }
    public static ScoreDTO transfer(Score score){
        if(score==null){
            return null;
        }
        ScoreDTO scoreDTO = new ScoreDTO();
        scoreDTO.setScore(score.getScore());
        scoreDTO.setUserId(score.getUserId());
        scoreDTO.setId(score.getId());
        return scoreDTO;
    }





    public static Score transfer(ScoreDTO scoreDTO){
        if(scoreDTO==null){
            return null;
        }
        Score score = new Score();
        score.setScore(scoreDTO.getScore());
        score.setUserId(scoreDTO.getUserId());
        score.setId(scoreDTO.getId());
        return score;
    }



}
